import { createRouter,  createWebHistory } from 'vue-router'
import LayoutShow from '@/LayoutShow'

const routes = [
  {
    path: '/',
    redirect:'/Home',
    component: LayoutShow,
    children: [
      {
        path: 'Home',
        component: () => import('@/views/Home/index'),
        name: 'Home',
        meta: { title: 'Dashboard', icon: 'dashboard', affix: true,index:1 }
      },
    ]
  },
  {
    path:'/webLogin',
    component: () => import('@/views/Login/index'),
    name:'webLogin'
  },
  {
    path:'/MoreCompany',
    redirect:'/MoreCompany/index',
    component: LayoutShow,
    children: [
      {
        path: 'index',
        component: () => import('@/views/More/MoreCompany/index'),
        name:'MoreCompany',
        meta: { title: 'Dashboard', icon: 'dashboard', affix: true,index:2 }
      },
    ]

  },
  {
    path:'/MoreJobInfo',
    redirect:'/MoreJobInfo/index',
    component: LayoutShow,
    children: [
      {
        path: 'index',
        component: () => import('@/views/More/MoreJobInfo/index'),
        name:'MoreJobInfo',
        meta: { title: 'Dashboard', icon: 'dashboard', affix: true,index:3 }
      },
    ]
  },
  {
    path:'/MoreNotice',
    redirect:'/MoreNotice/index',
    component: LayoutShow,
    children: [
      {
        path: 'index',
        component: () => import('@/views/MoreNotice/index'),
        name:'MoreNotice',
        meta: { title: 'Dashboard', icon: 'dashboard', affix: true,index:4 }
      },
    ]
  },
  {
    path:'/DetailCompany',
    component: LayoutShow,
    redirect: "/DetailCompany/index",
    children: [
      {
        path: 'index',
        component: () => import('@/views/DetailCompany/index'),
        name:'DetailCompany'
        // meta: { title: 'Dashboard', icon: 'dashboard', affix: true }
      },
    ]
  },
  {
    path:'/DetailJobInfo',
    component: LayoutShow,
    redirect: "/DetailJobInfo/index",
    children: [
      {
        path: 'index',
        component: () => import('@/views/DetailJobInfo/index'),
        name:'DetailJobInfo',
        //meta: { title: 'Dashboard', icon: 'dashboard', affix: true }
      },
    ]
  },
  {
    path:'/DetailNotice',
    component: LayoutShow,
    redirect: "/DetailNotice/index",
    children: [
      {
        path: 'index',
        component: () => import('@/views/DetailNotice/index'),
        name:'DetailNotice'
        // meta: { title: 'Dashboard', icon: 'dashboard', affix: true }
      },
    ]
  },
  {
    path: '/Back',
    component: () => import('@/views/Back/index'),
    name:'Back'
    },


  {
    path: '/Back/Company',
    redirect: "/Back/Company/comp",
    component: ()=>import("@/views/Back/Company/index"),
    children: [
      {
        path: 'job_infor',
        component:()=>import("@/views/Back/Company/job_infor")
      },
      {
        path:'comp',
        component:()=> import("@/views/Back/Company/comp")
      },
      {
        path:'total_data',
        component:()=> import("@/views/Back/Company/total_data")
      },

    ]
  },
  {
    path:'/Back/Student',
    redirect: "/Back/Student/stu_info",
    component: ()=>import("@/views/Back/Student/index"),
    children:[
      {
        path:'stu_info',
        component:()=>import("@/views/Back/Student/stu_info")
      },
      {
        path:'book_mark',
        component:()=> import("@/views/Back/Student/book_mark")
      }
    ]
  },
  {
    path:'/Back/Manage',
    redirect: "/Back/Manage/job_infor",
    component: ()=>import("@/views/Back/Manage/index"),
    children: [
      {
        path:'job_infor',
        component:()=>import("@/views/Back/Manage/job_infor")
      },
      {
        path:'com_infor',
        component:()=>import("@/views/Back/Manage/com_infor")
      },
      {
        path:'stu_infor',
        component:()=>import("@/views/Back/Manage/stu_infor")
      },
      {
        path:'public_notice',
        component:()=> import("@/views/Back/Manage/public_notice")
      },
    ]
  },
  {
    path: "/test",
    component: ()=>import("@/views/test")
  },


]

const router = createRouter({
  history: createWebHistory(),
  mode: 'history',
  routes

})

export default router
